﻿#include<iostream>
#include<vector>


void printVector(std::vector<int>& v)
{
	for (std::vector<int>::iterator it = v.begin(); it != v.end(); ++it)
	{
		std::cout << *it << " ";
	}
	std::cout << "\n";
}

void test01()
{
	std::vector<int> v1;
	for (int i = 0; i < 10; ++i)
	{
		v1.push_back(i);
	}
	printVector(v1);

	if (v1.empty())
	{
		std::cout << "v1为空" << '\n';
	}
	else
	{
		std::cout << "v1不为空" << '\n';
		std::cout << "容量：" << v1.capacity() << '\n';
		std::cout << "大小：" << v1.size() << '\n';
	}
	
	v1.resize(16, 6);
	printVector(v1);

	v1.resize(6);
	printVector(v1);
}



int main()
{
	test01();




	return 0;
}
